<?php

namespace app\shop\controller\supplier;

use app\api\model\settings\JoinApplyModel;
use app\Request;
use app\shop\controller\Controller;

/**
 * 商品分类控制器
 */
class JoinApply extends Controller
{

    public function index(Request $request)
    {
        $where = $request->param();
        $list = JoinApplyModel::listData($where, $this->getData());
        return $this->renderSuccess('', compact('list'));
    }

    public function edit(Request $request)
    {
        $where = $request->param();
        $one = JoinApplyModel::one($where);
        return $this->renderSuccess('', $one);
    }

    public function delete(Request $request)
    {
        $where = $request->param();
        JoinApplyModel::deleteData($where);
        return $this->renderSuccess();
    }
}
